package com.neussoft.neu24.dibuy.controller;

import com.neussoft.neu24.dibuy.entity.DemoUser;
import com.neussoft.neu24.dibuy.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

/**
 * @program: learn
 * @description:
 * @author: Jingdi.Duan ,duanjingdi@msn.com
 * @create: 2024-07-10 15:37
 **/

@RestController
@RequestMapping(value = "/u")
public class UserController {
    @Autowired
    private IUserService userService;

    @RequestMapping(value = "/add")
    public Mono<DemoUser> addUser(DemoUser user) {
        user = new DemoUser();
        return userService.addUser(user);
    }
}
